﻿using System;
using System.Collections.Generic;
using System.Text;
using Model;

namespace IBLL.Controller
{
    public interface IEditCotrollerTemplate
    {
        /// <summary>
        /// 加载处理
        /// </summary>
        void OnLoad(object key);

        /// <summary>
        /// 从界面获取数据后验证
        /// </summary>
        /// <returns></returns>
        bool OnDataVaild(EntityState state, out string error);
        ///// <summary>
        ///// 在保存处理之前
        ///// </summary>
        //void OnBeforeSave();
        /// <summary>
        /// 新建处理
        /// </summary>
        /// <returns></returns>
        void OnCreate();
        
        /// <summary>
        /// 保存处理
        /// </summary>
        /// <returns></returns>
        void OnSave();
        /// <summary>
        /// 更新
        /// </summary>
        void OnUpdate();
        /// <summary>
        /// 删除
        /// </summary>
        void OnDelete();
        
    }
}
